package com.example.test;

//import com.example.springbootvue3.Springbootvue3Application;
import lombok.Data;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.stereotype.Component;

@Component
@Data
public class value {
    @Value("${app.age}")
    private String a;
    @Value("${app.school}")
    private String b;
//    public static void main(String[] args) {
//        ApplicationContext context=SpringApplication.run(Springbootvue3Application.class, args);
//        ConfigurableApplicationContext context2=SpringApplication.run(value.class,args);
//        value a=context.getBean(value.class);
//        System.out.println(a.getA());
//        System.out.println(a.getB());
//    }
}
//package com.example.springbootvue3;
//
//import cn.itcast.pojo.Country;
//import cn.itcast.pojo.Province;
//import com.example.springbootvue3.controller.hellocontroller;
//import org.springframework.boot.SpringApplication;
//import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.annotation.Bean;
//
//@SpringBootApplication
////@EnableConfigurationProperties(hellocontroller.class)
//public class value {
//
//    public static void main(String[] args) {
//        ApplicationContext context=SpringApplication.run(value.class, args);
//        Country country=context.getBean(Country.class);
//        System.out.println(country);
//        Province province= (Province) context.getBean("aa");
//        System.out.println(province);
//    }
//}
